package com.yonyou.cms.epc.client.entity.graphic;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cms.epc.client.entity.BasePO;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.sysmanage.client.domains.dto.UserDictDto;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author yzy
 * @since 2022-06-08
 */
@TableName("tt_graphic_system")
public class GraphicSystemPO extends BasePO<GraphicSystemPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 系统代码
     */
    @TableId(value = "SYSTEM_ID", type = IdType.AUTO)
    private Integer systemId;
    /**
     * 系统名称
     */
    @TableField("SYSTEM_CODE")
    private String systemCode;
    /**
     * 图解系统id
     */
    @TableField("SYSTEM_NAME")
    private String systemName;
    /**
     * 状态 (10031001启用/10031002禁用)
     */
    @TableField("STATU")
    private Integer statu;

    @TableField(exist = false)
    private UserDictDto updateUserInfo;

    @TableField(exist = false)
    private UserDictDto createUserInfo;

    public UserDictDto getUpdateUserInfo() {
        return updateUserInfo;
    }

    public void setUpdateUserInfo(UserDictDto updateUserInfo) {
        this.updateUserInfo = updateUserInfo;
    }

    public UserDictDto getCreateUserInfo() {
        return createUserInfo;
    }

    public void setCreateUserInfo(UserDictDto createUserInfo) {
        this.createUserInfo = createUserInfo;
    }

    public GraphicSystemPO() {
        super();
    }


    public Integer getSystemId() {
        return systemId;
    }

    public void setSystemId(Integer systemId) {
        this.systemId = systemId;
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public String getSystemName() {
        return systemName;
    }

    public void setSystemName(String systemName) {
        this.systemName = systemName;
    }

    public Integer getStatu() {
        return statu;
    }

    public void setStatu(Integer statu) {
        this.statu = statu;
    }

    @Override
    protected Serializable pkVal() {
        return this.systemId;
    }

    @Override
    public String toString() {
        return "GraphicSystemPO{" +
        "systemId=" + systemId +
        ", systemCode=" + systemCode +
        ", systemName=" + systemName +
        ", statu=" + statu +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author yzy
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "systemId");
    }


}
